﻿@model ClientSite2nd.Models.Client

@{
    ViewBag.Title = "Edit Profile";
}
<style>
    p.edit-title {
        font-size: large;
    }
</style>

@using (Html.BeginForm("EditProfile", "Account", FormMethod.Post, new { enctype = "multipart/form-data", data_ajax="false" }))
{
    @Html.ValidationSummary(true)

    <fieldset>
        <p class="edit-title">Edit Profile for <strong>@Model.UserName</strong>.<br/>
            Current company: <strong>@Model.Company</strong>
        </p>
        <div class="editor-label">
            <strong>Email:</strong>
            @Html.DisplayFor(model => model.Email)
        </div>
        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.UserName)
        @Html.HiddenFor(model => model.Company)
        @Html.HiddenFor(model => model.Email)

        
        <br/>
        <div class="editor-label">
            @Html.LabelFor(model => model.ProfilePicture)
        </div>
        <div>
            @ViewBag.StatusMsg
        </div>
        <div class="editor-field">
            <input type="file" name="profileImage" id="profileImage" accept="image/*" />
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.FirstName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LastName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
            @Html.ValidationMessageFor(model => model.LastName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.BirthdayDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BirthdayDate)
            @Html.ValidationMessageFor(model => model.BirthdayDate)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Address)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Address)
            @Html.ValidationMessageFor(model => model.Address)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
